{__NOLAYOUT__}
<!DOCTYPE html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/bbs/static/common/js/layui/css/layui.css">
    <link rel="stylesheet" href="__PUBLIC__/bbs/static/default/css/global.css">
    <link rel="stylesheet" href="__PUBLIC__/bbs/static/default/css/index.css">
    <meta charset="UTF-8">
    <title>社区-{$seo_title}</title>
    <include file="Index:meta" />
    <style>
        #page{text-align: center;margin-top: 20px;margin-bottom: 20px;}
        #page .a1{display: none;}
        #page a{color: #2AABED;width: 20px;height: 20px;padding: 10px;}
        #page span{width: 20px;height: 20px;padding: 10px;}
        #page .first{display: none;}
        #page .last{display: none;}
    </style>
    <if condition="($p eq '') OR ($p eq 1)">
        <style>#page .previous{display: none;}</style>
    </if>
</head>
<include file="Index:header" />
<body style="margin-top:0px;">
    <div class="fly-panel fly-column">
        <div class="layui-container">
            <form action="{:U('Home/Bbs/index')}" method="POST" id="search">
                <input type="text" class="layui-input-z" name="keywords" placeholder="请输入关键字">
                <span class="fly-search">
                    <i class="layui-icon submit"></i>
                </span>
                    
            </form>
                <div class="fly-column-right">
                    <a href="{:U('Home/Bbs/add')}" class="layui-btn">发表新帖</a>
                </div>    
        </div>
    </div>

    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <if condition="$top neq ''">
                <div class="fly-panel">
                    <div class="fly-panel-title fly-filter">
                        置顶
                    </div>
                    <ul class="fly-list">
                        <foreach name="top" item="t">
                            <li style="height:80px">
                                <a href="{:U('Home/Bbs/center',array('uid'=>$t['uid'],'type'=>$t['type']))}" class="fly-avatar">
                                    <img <if condition="$t['img'] eq ''">src="__PUBLIC__/bbs/uploads/avatar/default_middle.png"<else/>src="{$t.img}"</if>alt="{$t.username}">
                                </a>
                                <h2>
                                    <a href="{:U('Home/Bbs/show',array('id'=>$t['id']))}">{$t.title}</a>
                                </h2>
                                <div class="fly-list-info">
                                    <span class="pull-right">
                                        <i class="iconfont icon-pinglun1" title="评论"></i> {$t.posts}
                                    </span>
                                    <a href="{:U('Home/Bbs/center',array('uid'=>$t['uid'],'type'=>$t['type']))}" link>
                                        <cite>{$t.username}</cite>
                                    </a>
                                    <span>发表于{$t.time|toDate}</span>
                                </div>
                                <div class="fly-list-badge">
                                    <if condition="$t['is_top'] eq 1">
                                        <span class="layui-badge layui-bg-black">置顶</span>
                                    </if>
                                    <if condition="$t['is_re'] eq 1">
                                        <span class="layui-badge layui-bg-red">精帖</span>
                                    </if>
                                </div>
                            </li>
                        </foreach>
                    </ul>
                </div>
                </if>
                <div class="fly-panel" style="margin-bottom: 0;">
                    <div class="fly-panel-title fly-filter">
                        最近发表
                    </div>
                    <ul class="fly-list">
                        <foreach name="list" item="vo">
                            <li style="height:80px">
                                <a href="{:U('Home/Bbs/center',array('uid'=>$vo['uid'],'type'=>$vo['type']))}" class="fly-avatar">
                                    <img <if condition="$vo['img'] eq ''">src="__PUBLIC__/bbs/uploads/avatar/default_middle.png"<else/>src="{$vo.img}"</if> alt="{$vo.username}">
                                </a>
                                <h2>
                                    <a href="{:U('Home/Bbs/show',array('id'=>$vo['id']))}">{$vo.title}</a>
                                </h2>
                                <div class="fly-list-info">
                                    <span class="pull-right">
                                        <i class="iconfont icon-pinglun1" title="评论"></i> {$vo.posts}
                                    </span>
                                    <a href="{:U('Home/Bbs/center',array('uid'=>$vo['uid'],'type'=>$vo['type']))}" link>
                                        <cite>{$vo.username}</cite>
                                    </a>
                                    <span>发表于{$vo.time|toDate}</span>
                                </div>
                                <div class="fly-list-badge">
                                    <if condition="$vo['is_top'] eq 1">
                                        <span class="layui-badge layui-bg-black">置顶</span>
                                    </if>
                                    <if condition="$vo['is_re'] eq 1">
                                        <span class="layui-badge layui-bg-red">精帖</span>
                                    </if>
                                </div>
                            </li>
                        </foreach>
                    </ul>
                </div>
                <div id="page">{$page}</div>
            </div>
            <div class="layui-col-md4">
                <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
                    <h3 class="fly-panel-title">用户中心</h3>
                    <if condition="$uid neq ''">
                        <section class="user-box">
                            <div class="pic">
                                <a href="{:U('Home/Bbs/center',array('uid'=>$uid,'type'=>$ms))}">
                                    <img <if condition="$u_img eq ''">src="__PUBLIC__/bbs/uploads/avatar/default_middle.png"<else/>src="{$u_img}"</if> />
                                </a>
                            </div>
                            <p>
                                <a>用户中心</a>
                            </p>
                        </section>
                        <else/>
                        <section class="user-box">
                            <h1 align="center">登录，访问更多内容</h1>
                        </section>
                    </if>
                </div>

                <dl class="fly-panel fly-list-one">
                    <dt class="fly-panel-title">热门</dt>
                    <foreach name="hot" item="h">
                        <dd>
                            <a href="{:U('Home/Bbs/show',array('id'=>$h['id']))}" style="color:#2AABED">{$h.title}</a>
                            <span>
                                <i class="iconfont icon-pinglun1">{$h.posts}</i>
                            </span>
                        </dd>
                    </foreach>
                </dl>
            </div>
        </div>
    </div>
    <!--JS引用-->
    <script src="__PUBLIC__/bbs/static/common/js/jquery.min.js"></script>
    <script src="__PUBLIC__/bbs/static/common/js/layui/layui.all.js"></script>
    <script src="__PUBLIC__/bbs/static/common/js/global.js"></script>
</body>
<script>
    $('.submit').on('click', function () {
        $('#search').submit();
    });
</script>

</html>
<include file="Index:footer" />